import java.util.Random;

public class BigV {
    //一个大V直播抽奖，奖品是现金红包，分别有(2, 588, 888, 1000, 10000)五个奖金。请使用代码模拟抽奖，
    //打印出每个奖项，奖项的出现顺序要随机且不重复。打印效果如下：（随机顺序，不一定是下面的顺序）
    public static void main(String[] args) {
        int[] arr = {2, 588, 888, 1000, 10000};
        Random r = new Random();
        int[] sum = new int[arr.length];
        for (int i = 0; i < arr.length; ) {
            int number = r.nextInt(arr.length);
            int price = arr[number];
            boolean flag = cotain(sum, price);
             if(!flag){
                 sum[i] = price;
                 i++;
             }

        }
        for (int i = 0; i < sum.length; i++) {
            System.out.println(sum[i]);
        }


    }

    public static boolean cotain(int[] arr, int price) {
        for (int i = 0; i < arr.length; i++) {
            if (arr[i] == price) {
                return true;
            }
        }
        return false;
    }
}
